home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / Videotoolbox 96-08-22-c.sit / VideoToolbox / VideoToolboxSources / GetTimeDateString.c < prev    next >
MacBinary  |  1995-07-27  |  1.5 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: GetTimeDateString.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Jul 27 01:40:46 1995, modified Thu Jul 27 01:40:46 1995, creator 'CWIE', type ASCII, 772 bytes "GetTimeDateString.c" , at 0x384 500 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 13 47 65 74 54 69 6d | 65 44 61 74 65 53 74 72 |..GetTim|eDateStr|
|00000010| 69 6e 67 2e 63 00 00 00 | 00 00 00 00 00 00 00 00 |ing.c...|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 03 04 00 | 00 01 f4 ac 3c d7 5e ac |........|....<.^.|
|00000060| 3c d7 5e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |<.^.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 51 f4 00 00 |........|....Q...|
|00000080| 2f 2a 0d 47 65 74 54 69 | 6d 65 44 61 74 65 53 74 |/*.GetTi|meDateSt|
|00000090| 72 69 6e 67 0d 0d 52 65 | 74 75 72 6e 20 61 20 6d |ring..Re|turn a m|
|000000a0| 61 6c 6c 6f 63 65 64 20 | 73 74 72 69 6e 67 20 77 |alloced |string w|
|000000b0| 69 74 68 20 74 68 65 20 | 74 69 6d 65 20 61 6e 64 |ith the |time and|
|000000c0| 20 64 61 74 65 20 69 6e | 20 61 20 6e 69 63 65 20 | date in| a nice |
|000000d0| 66 6f 72 6d 61 74 3a 0d | 09 22 35 3a 30 33 20 50 |format:.|."5:03 P|
|000000e0| 4d 2c 20 4d 6f 6e 64 61 | 79 2c 20 53 65 70 74 65 |M, Monda|y, Septe|
|000000f0| 6d 62 65 72 20 31 33 2c | 20 31 39 39 33 22 0d 59 |mber 13,| 1993".Y|
|00000100| 6f 75 20 6d 61 79 20 73 | 75 70 70 6c 79 20 61 20 |ou may s|upply a |
|00000110| 63 61 6c 65 6e 64 61 72 | 20 74 69 6d 65 2c 20 61 |calendar| time, a|
|00000120| 73 20 72 65 74 75 72 6e | 65 64 20 62 79 20 74 69 |s return|ed by ti|
|00000130| 6d 65 28 29 2c 20 6f 72 | 20 79 6f 75 20 6d 61 79 |me(), or| you may|
|00000140| 20 73 75 70 70 6c 79 20 | 30 20 74 6f 0d 75 73 65 | supply |0 to.use|
|00000150| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 74 69 6d | the cur|rent tim|
|00000160| 65 2e 20 0d 0d 48 49 53 | 54 4f 52 59 3a 0d 38 2f |e. ..HIS|TORY:.8/|
|00000170| 39 33 09 64 68 62 2c 6a | 6d 73 09 77 72 6f 74 65 |93.dhb,j|ms.wrote|
|00000180| 20 69 74 2c 20 75 73 69 | 6e 67 20 41 70 70 6c 65 | it, usi|ng Apple|
|00000190| 20 74 6f 6f 6c 62 6f 78 | 2e 0d 39 2f 31 33 2f 39 | toolbox|..9/13/9|
|000001a0| 33 09 64 67 70 09 72 65 | 77 72 6f 74 65 20 69 74 |3.dgp.re|wrote it|
|000001b0| 20 75 73 69 6e 67 20 53 | 74 61 6e 64 61 72 64 20 | using S|tandard |
|000001c0| 43 20 6c 69 62 72 61 72 | 79 2e 0d 39 2f 31 36 2f |C librar|y..9/16/|
|000001d0| 39 33 20 64 68 62 20 46 | 69 78 65 64 20 6e 61 6d |93 dhb F|ixed nam|
|000001e0| 65 20 6f 66 20 72 6f 75 | 74 69 6e 65 20 69 6e 20 |e of rou|tine in |
|000001f0| 50 72 69 6e 74 66 45 78 | 69 74 2e 0d 37 2f 31 36 |PrintfEx|it..7/16|
|00000200| 2f 39 34 20 64 67 70 20 | 73 75 70 70 72 65 73 73 |/94 dgp |suppress|
|00000210| 20 6c 65 61 64 69 6e 67 | 20 7a 65 72 6f 20 69 6e | leading| zero in|
|00000220| 20 68 6f 75 72 73 2e 0d | 2a 2f 0d 23 69 6e 63 6c | hours..|*/.#incl|
|00000230| 75 64 65 20 22 56 69 64 | 65 6f 54 6f 6f 6c 62 6f |ude "Vid|eoToolbo|
|00000240| 78 2e 68 22 0d 23 69 66 | 6e 64 65 66 20 5f 54 49 |x.h".#if|ndef _TI|
|00000250| 4d 45 0d 09 23 69 6e 63 | 6c 75 64 65 20 3c 74 69 |ME..#inc|lude <ti|
|00000260| 6d 65 2e 68 3e 09 2f 2a | 20 53 74 61 6e 64 61 72 |me.h>./*| Standar|
|00000270| 64 20 43 20 6c 69 62 72 | 61 72 79 20 2a 2f 0d 23 |d C libr|ary */.#|
|00000280| 65 6e 64 69 66 0d 0d 63 | 68 61 72 20 2a 47 65 74 |endif..c|har *Get|
|00000290| 54 69 6d 65 44 61 74 65 | 53 74 72 69 6e 67 28 74 |TimeDate|String(t|
|000002a0| 69 6d 65 5f 74 20 74 29 | 0d 7b 0d 09 63 68 61 72 |ime_t t)|.{..char|
|000002b0| 20 2a 73 3b 0d 09 0d 09 | 73 3d 6d 61 6c 6c 6f 63 | *s;....|s=malloc|
|000002c0| 28 36 34 29 3b 0d 09 69 | 66 28 73 3d 3d 4e 55 4c |(64);..i|f(s==NUL|
|000002d0| 4c 29 50 72 69 6e 74 66 | 45 78 69 74 28 22 47 65 |L)Printf|Exit("Ge|
|000002e0| 74 54 69 6d 65 44 61 74 | 65 53 74 72 69 6e 67 3a |tTimeDat|eString:|
|000002f0| 20 6d 61 6c 6c 6f 63 28 | 36 34 29 20 66 61 69 6c | malloc(|64) fail|
|00000300| 65 64 2e 5c 6e 22 29 3b | 0d 09 69 66 28 74 3d 3d |ed.\n");|..if(t==|
|00000310| 30 29 74 3d 74 69 6d 65 | 28 4e 55 4c 4c 29 3b 0d |0)t=time|(NULL);.|
|00000320| 09 73 74 72 66 74 69 6d | 65 28 73 2c 36 34 2c 22 |.strftim|e(s,64,"|
|00000330| 25 49 3a 25 4d 20 25 70 | 2c 20 25 41 2c 20 25 42 |%I:%M %p|, %A, %B|
|00000340| 20 25 64 2c 20 25 59 22 | 2c 6c 6f 63 61 6c 74 69 | %d, %Y"|,localti|
|00000350| 6d 65 28 26 74 29 29 3b | 0d 09 69 66 28 73 5b 30 |me(&t));|..if(s[0|
|00000360| 5d 3d 3d 27 30 27 29 73 | 74 72 63 70 79 28 73 2c |]=='0')s|trcpy(s,|
|00000370| 73 2b 31 29 3b 0d 09 72 | 65 74 75 72 6e 28 73 29 |s+1);..r|eturn(s)|
|00000380| 3b 0d 7d 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |;.}.....|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 01 00 00 00 01 96 | 00 00 00 96 00 00 00 5e |........|.......^|
|00000410| 00 00 0e c7 ab c0 40 15 | 7f fe 07 00 00 00 00 03 |......@.|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 03 |........|........|
|00000430| 13 47 65 74 54 69 6d 65 | 44 61 74 65 53 74 72 69 |.GetTime|DateStri|
|00000440| 6e 67 2e 63 02 00 00 00 | 54 45 58 54 43 57 49 45 |ng.c....|TEXTCWIE|
|00000450| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 14 02 40 |..TEXTCW|IE.....@|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 a8 ba a8 4c 00 00 | 03 04 00 00 01 f4 00 00 |.....L..|........|
|00000480| 0e c9 37 a6 40 15 7f fe | 07 00 00 00 00 1c 00 00 |..7.@...|........|
|00000490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 44 00 00 |........|.....D..|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 3c 00 00 |........|.....<..|
|000004b0| 00 00 a8 be 4c b3 00 00 | 01 1d 00 00 00 00 00 00 |....L...|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 05 00 00 00 0e cc |........|........|
|000004f0| ab be 00 10 7f fe 07 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 00 00 1e 00 3c 00 24 | 01 dd 02 3d 00 3c 00 24 |.....<.$|...=.<.$|
|00000510| 01 dd 02 3d 00 00 00 00 | 00 00 00 00 00 00 00 00 |...=....|........|
|00000520| 00 00 00 00 00 1c 00 01 | 00 00 01 f7 00 00 02 08 |........|........|
|00000530| 11 47 65 74 54 69 6d 65 | 44 61 74 65 53 74 72 69 |.GetTime|DateStri|
|00000540| 6e 67 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |ng...H..|Monaco..|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 3d 00 03 |........|.....=..|
|00000570| 01 a0 02 7d 00 3d 00 03 | 01 a0 02 7d ac 3c 9f 2a |...}.=..|...}.<.*|
|00000580| 00 00 01 d4 00 00 01 d4 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 04 00 01 00 01 00 00 | 01 00 00 00 01 96 00 00 |........|........|
|000005a0| 00 96 00 00 00 5e 01 99 | 5f e8 1d 62 00 00 00 1c |.....^..|_..b....|
|000005b0| 00 5e 00 01 4d 50 53 52 | 00 02 00 12 4d 57 42 42 |.^..MPSR|....MWBB|
|000005c0| 00 00 00 36 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...6....|........|
|000005d0| 03 ef ff ff 00 00 00 22 | 00 00 00 00 03 ed ff ff |......."|........|
|000005e0| 00 00 00 42 00 00 00 00 | 03 f0 ff ff 00 00 00 8e |...B....|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+